package com.demo.userprofile.sdk;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 通过SpringCloud调用服务
 *
 * @author userprofile_demo
 */
@FeignClient(name = "UserprofileServiceProvider", contextId = "sayHelloServer")
public interface SayHelloServiceClient {

    @ResponseBody
    @RequestMapping(value = "/getHelloWords", method = RequestMethod.GET)
    public String getWordsFromService(@RequestParam("name") String name);
}
